<template>
	<view>
		<view class="kongs" v-if="isOne">
			<image src="/static/k6.png" mode=""></image>
			<view class="ts">
				每位稻友有且仅有一次转会机会，
				<view class="">请您慎重考虑！</view>
			</view>
		</view>
		<view class="" v-else>
			<view class="content">
				<view class="">
					<view class="tip flex" v-if="data.verifyStatus == '已通过'">
						<uni-icons type="checkbox-filled" size="18" color="#2EB246"></uni-icons>
						<view class="ts t2">转会成功</view>
					</view>
					<view class="tip flex" v-if="data.verifyStatus == '待审核'">
						<uni-icons type="person-filled" size="18" color="#75613E"></uni-icons>
						<view class="ts t3">转会审核中</view>
					</view>
					<view class="tip flex" v-if="data.verifyStatus == '已驳回'">
						<uni-icons type="clear" size="18" color="#DD4739"></uni-icons>
						<view class="ts t1">转会失败</view>
					</view>
				</view>
				<view class="yy">{{data.reason}}</view>
				<view class="time">申请时间：{{data.createTime}}</view>
			</view>
			<view class="block">
				<view class="item flex_jc_sb">
					<view class="t1">社长ID</view>
					<view class="">{{data.groupUserId}}</view>
				</view>
				<view class="item flex_jc_sb">
					<view class="t1">分社长昵称</view>
					<view class="">{{data.groupUserName}}</view>
				</view>
			</view>
			<view class="block">
				<view class="item flex_jc_sb">
					<view class="t1">审核结果</view>
					<view class="">
						<span v-if="data.verifyStatus == '待审核'">审核中</span>
						<span v-if="data.verifyStatus == '已通过'">转会成功</span>
						<span v-if="data.verifyStatus == '已驳回'">转会失败</span>
					</view>
				</view>
				<view class="item flex_jc_sb" v-if="data.verifyStatus == '已驳回'">
					<view class="t1">驳回原因</view>
					<view class="">{{data.verifyDesc}}</view>
				</view>
				<view class="item flex_jc_sb">
					<view class="t1">审核时间</view>
					<view class="">{{data.verifyTime}}</view>
				</view>
			</view>
		</view>
		<view class="bottom_btns">
			<view class="cont">
				<view class="onebtns active" @click="open" v-if="isOne">我考虑好了</view>
				<view class="onebtns active" @click="open" v-if="data.verifyStatus == '已驳回'">重新申请</view>
			</view>
		</view>
	</view>
</template>

<script setup>
import { ref, reactive, getCurrentInstance } from 'vue';
import { onLoad, onShow, onReachBottom, onPageScroll } from '@dcloudio/uni-app';
import { groupChangeInfo, groupChangeApply } from '@/api/about.js';
const data = reactive({});
const isOne = ref(undefined);
onShow(() => {
	groupChangeInfo({}).then((res) => {
		if (res.code == 200 && res.data) {
			isOne.value = false;
			Object.assign(data, res.data);
		} else {
			isOne.value = true;
		}
	});
});
const open = () => {
	uni.navigateTo({
		url: '/mypage/more/transfer'
	});
};
</script>
<style lang="scss">
page {
	background: #f7f8f6;
}
.kongs {
	margin-top: 160rpx;
	text-align: center;
	image {
		width: 240rpx;
		height: 240rpx;
	}
	.ts {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #000000;
		text-align: center;
		margin-top: 68rpx;
	}
}
.content {
	width: 710rpx;
	background: #ffffff;
	border-radius: 20rpx 20rpx 20rpx 20rpx;
	padding: 20rpx;
	box-sizing: border-box;
	margin: 20rpx auto;
	.tip {
		.ts {
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
		}
		.t1 {
			color: #dd4739;
		}
		.t2 {
			color: #2eb246;
		}
		.t3 {
			color: #75613e;
		}
	}
	.yy {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #000000;
		margin-top: 14rpx;
	}
	.time {
		margin-top: 20rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #8f8f8b;
	}
}
.block {
	width: 710rpx;
	background: #ffffff;
	border-radius: 20rpx 20rpx 20rpx 20rpx;
	padding: 1rpx 20rpx;
	box-sizing: border-box;
	margin: 20rpx auto;
	.item {
		border-bottom: 1px solid #e5ded1;
		padding-bottom: 24rpx;
		margin-top: 36rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #000000;
		.t1 {
			color: #979797;
		}
	}
	.item:last-child {
		border: none;
	}
}
</style>
